.class public Lcom/bitauto/autoeasy/BaseListActivity;
.super Landroid/app/ListActivity;
.source "BaseListActivity.java"


# instance fields
.field tempView:Landroid/view/View;


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 25
    invoke-direct {p0}, Landroid/app/ListActivity;-><init>()V

    return-void
.end method

.method public static ExitDialog(Landroid/content/Context;)Landroid/app/Dialog;
    .locals 3
    .parameter "context"

    .prologue
    .line 137
    new-instance v0, Landroid/app/AlertDialog$Builder;

    invoke-direct {v0, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 138
    .local v0, builder:Landroid/app/AlertDialog$Builder;
    const-string v1, "\u9000\u51fa\u7a0b\u5e8f"

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    .line 139
    const-string v1, "\u786e\u5b9a\u8981\u9000\u51fa\u7a0b\u5e8f\u5417\uff1f"

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    .line 140
    const-string v1, "\u786e\u5b9a"

    new-instance v2, Lcom/bitauto/autoeasy/BaseListActivity$2;

    invoke-direct {v2}, Lcom/bitauto/autoeasy/BaseListActivity$2;-><init>()V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setPositiveButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 145
    const-string v1, "\u53d6\u6d88"

    new-instance v2, Lcom/bitauto/autoeasy/BaseListActivity$3;

    invoke-direct {v2}, Lcom/bitauto/autoeasy/BaseListActivity$3;-><init>()V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setNegativeButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 150
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->show()Landroid/app/AlertDialog;

    move-result-object v1

    return-object v1
.end method


# virtual methods
.method public DialogCity(Ljava/util/ArrayList;)Landroid/app/AlertDialog;
    .locals 3
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/bitauto/autoeasy/selectcar/Object/City;",
            ">;)",
            "Landroid/app/AlertDialog;"
        }
    .end annotation

    .prologue
    .line 117
    .local p1, cityList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/bitauto/autoeasy/selectcar/Object/City;>;"
    new-instance v0, Landroid/app/AlertDialog$Builder;

    invoke-direct {v0, p0}, Landroid/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    .line 118
    .local v0, builder:Landroid/app/AlertDialog$Builder;
    const-string v1, "\u9009\u62e9\u57ce\u5e02"

    invoke-virtual {v0, v1}, Landroid/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;

    .line 119
    invoke-virtual {p0, p1}, Lcom/bitauto/autoeasy/BaseListActivity;->ListTOArray(Ljava/util/ArrayList;)[Ljava/lang/String;

    move-result-object v1

    new-instance v2, Lcom/bitauto/autoeasy/BaseListActivity$1;

    invoke-direct {v2, p0, p1}, Lcom/bitauto/autoeasy/BaseListActivity$1;-><init>(Lcom/bitauto/autoeasy/BaseListActivity;Ljava/util/ArrayList;)V

    invoke-virtual {v0, v1, v2}, Landroid/app/AlertDialog$Builder;->setItems([Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;

    .line 125
    invoke-virtual {v0}, Landroid/app/AlertDialog$Builder;->create()Landroid/app/AlertDialog;

    move-result-object v1

    return-object v1
.end method

.method public ListTOArray(Ljava/util/ArrayList;)[Ljava/lang/String;
    .locals 3
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/bitauto/autoeasy/selectcar/Object/City;",
            ">;)[",
            "Ljava/lang/String;"
        }
    .end annotation

    .prologue
    .line 129
    .local p1, cityList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/bitauto/autoeasy/selectcar/Object/City;>;"
    invoke-virtual {p1}, Ljava/util/ArrayList;->size()I

    move-result v2

    new-array v0, v2, [Ljava/lang/String;

    .line 130
    .local v0, city:[Ljava/lang/String;
    const/4 v1, 0x0

    .end local p0
    .local v1, i:I
    :goto_0
    invoke-virtual {p1}, Ljava/util/ArrayList;->size()I

    move-result v2

    if-lt v1, v2, :cond_0

    .line 133
    return-object v0

    .line 131
    :cond_0
    invoke-virtual {p1, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object p0

    check-cast p0, Lcom/bitauto/autoeasy/selectcar/Object/City;

    invoke-virtual {p0}, Lcom/bitauto/autoeasy/selectcar/Object/City;->getCityName()Ljava/lang/String;

    move-result-object v2

    aput-object v2, v0, v1

    .line 130
    add-int/lit8 v1, v1, 0x1

    goto :goto_0
.end method

.method public downLoadCity()V
    .locals 3

    .prologue
    .line 106
    new-instance v1, Lcom/bitauto/autoeasy/selectcar/Object/CityParser;

    const-string v2, "http://m.bitauto.com/iphoneapi/v2/listcity/?domain=1"

    invoke-direct {v1, v2}, Lcom/bitauto/autoeasy/selectcar/Object/CityParser;-><init>(Ljava/lang/String;)V

    .line 107
    .local v1, cityParser:Lcom/bitauto/autoeasy/selectcar/Object/CityParser;
    invoke-virtual {v1}, Lcom/bitauto/autoeasy/selectcar/Object/CityParser;->Paser2Object()V

    .line 108
    invoke-virtual {v1}, Lcom/bitauto/autoeasy/selectcar/Object/CityParser;->getList()Ljava/util/ArrayList;

    move-result-object v0

    .line 109
    .local v0, cityList:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lcom/bitauto/autoeasy/selectcar/Object/City;>;"
    if-nez v0, :cond_0

    .line 112
    const-string v2, "\u83b7\u53d6\u6570\u636e\u5931\u8d25,\u8bf7\u68c0\u67e5\u7f51\u7edc\u662f\u5426\u8fde\u63a5."

    invoke-static {p0, v2}, Lcom/bitauto/autoeasy/tool/ToolBox;->showToast(Landroid/content/Context;Ljava/lang/String;)V

    .line 114
    :cond_0
    return-void
.end method

.method public getCityID()Ljava/lang/String;
    .locals 3

    .prologue
    .line 102
    const-string v0, "autoeasy"

    const/4 v1, 0x1

    invoke-virtual {p0, v0, v1}, Lcom/bitauto/autoeasy/BaseListActivity;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v0

    const-string v1, "cityid"

    const-string v2, "201"

    invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 0
    .parameter "savedInstanceState"

    .prologue
    .line 33
    invoke-super {p0, p1}, Landroid/app/ListActivity;->onCreate(Landroid/os/Bundle;)V

    .line 35
    return-void
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 1
    .parameter "keyCode"
    .parameter "event"

    .prologue
    .line 93
    const/4 v0, 0x4

    if-ne p1, v0, :cond_0

    invoke-virtual {p2}, Landroid/view/KeyEvent;->getRepeatCount()I

    move-result v0

    if-nez v0, :cond_0

    .line 95
    const/4 v0, 0x0

    .line 97
    :goto_0
    return v0

    :cond_0
    invoke-super {p0, p1, p2}, Landroid/app/ListActivity;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    goto :goto_0
.end method

.method public onPause()V
    .locals 0

    .prologue
    .line 63
    invoke-super {p0}, Landroid/app/ListActivity;->onPause()V

    .line 64
    invoke-static {p0}, Lcom/mobclick/android/MobclickAgent;->onPause(Landroid/content/Context;)V

    .line 65
    return-void
.end method

.method protected onResume()V
    .locals 0

    .prologue
    .line 58
    invoke-super {p0}, Landroid/app/ListActivity;->onResume()V

    .line 59
    invoke-static {p0}, Lcom/mobclick/android/MobclickAgent;->onResume(Landroid/content/Context;)V

    .line 60
    return-void
.end method

.method public setLayout(I)V
    .locals 0
    .parameter "layoutid"

    .prologue
    .line 42
    invoke-virtual {p0, p1}, Lcom/bitauto/autoeasy/BaseListActivity;->setTitle(I)V

    .line 44
    return-void
.end method

.method public setTitle(I)V
    .locals 3
    .parameter "layoutid"

    .prologue
    const/4 v2, 0x7

    .line 50
    invoke-virtual {p0, v2}, Lcom/bitauto/autoeasy/BaseListActivity;->requestWindowFeature(I)Z

    .line 51
    invoke-virtual {p0, p1}, Lcom/bitauto/autoeasy/BaseListActivity;->setContentView(I)V

    .line 52
    invoke-virtual {p0}, Lcom/bitauto/autoeasy/BaseListActivity;->getWindow()Landroid/view/Window;

    move-result-object v0

    const v1, 0x7f030022

    invoke-virtual {v0, v2, v1}, Landroid/view/Window;->setFeatureInt(II)V

    .line 54
    return-void
.end method

.method public setTitleContent(Ljava/lang/String;)V
    .locals 2
    .parameter "str"

    .prologue
    .line 72
    const v1, 0x7f0b01ab

    invoke-virtual {p0, v1}, Lcom/bitauto/autoeasy/BaseListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    .line 73
    .local v0, textView:Landroid/widget/TextView;
    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 74
    return-void
.end method

.method public setTitleProgressBar(Z)V
    .locals 5
    .parameter "flog"

    .prologue
    const/16 v4, 0x8

    const/4 v3, 0x0

    .line 81
    const v2, 0x7f0b01ad

    invoke-virtual {p0, v2}, Lcom/bitauto/autoeasy/BaseListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ProgressBar;

    .line 82
    .local v1, progressBar:Landroid/widget/ProgressBar;
    const v2, 0x7f0b01ac

    invoke-virtual {p0, v2}, Lcom/bitauto/autoeasy/BaseListActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageButton;

    .line 83
    .local v0, imageButton:Landroid/widget/ImageButton;
    if-eqz p1, :cond_0

    .line 84
    invoke-virtual {v0, v4}, Landroid/widget/ImageButton;->setVisibility(I)V

    .line 85
    invoke-virtual {v1, v3}, Landroid/widget/ProgressBar;->setVisibility(I)V

    .line 90
    :goto_0
    return-void

    .line 87
    :cond_0
    invoke-virtual {v1, v4}, Landroid/widget/ProgressBar;->setVisibility(I)V

    .line 88
    invoke-virtual {v0, v3}, Landroid/widget/ImageButton;->setVisibility(I)V

    goto :goto_0
.end method
